{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9000\viewh9000\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural

\f0\fs24 \cf0 Each graphic object requires the following methods:\
\
<class name> : constructor method\
get: get value of a parameter\
set: set value of a parameter (or list of parameters)\
draw: draw to screen\
blank: erase from screen (most just set visible flag to 'off')\
\
\
from GLSLShaders:\
/* FreqConGabor.frag.txt shader\
 * This is a GLSL fragment shader that defines a Gabor patch.  It has \
 * several parameters that you can adjust at runtime, including spatial \
 * frequency and contrast.\
 *\
 * Three parameters are float-valued scalars:\
 *  f,      cosinusoid spatial frequency (1/deg. vis. ang)\
 *  c,      the Michelson contrast\
 *  ppd,	pixels per degree of the monitor/viewing distance\
 *\
 * One parameter is a float-valued 2-element vector:\
 *  pixCenter,  The zero-point of the cosinusoid, in pixels\
 *\
 * Two parameters are float-valued 4-element vectors:\
 *  ColorHigh,  The "white" color of the grating [RGBA], ranged 0-1\
 *  ColorLow,   The "black" color of the grating [RGBA], ranged 0-1\
 *\
 * NB: when ColorHigh = [1 1 1 1] (white) and ColorLow = [0 0 0 1] (black),\
 * then c really is the Michelson contrast.  Otherwist, c behaves like a\
 * similar-but-not-really-Michelson blending factor for the two colors.\
 *\
 * Spawned 2008 by Ben Heasly \
 *  from Mario Kleiner's "ExpandingRings.frag.txt" in Psychophysics Toolbox\
 */\
\
uniform float f;\
uniform float c;\
uniform float ppd;\
uniform vec2  pixCenter;\
uniform vec4  ColorHigh;\
uniform vec4  ColorLow;\
\
void main()\
\{\
    /* Query current output texel position: */\
    vec2 p = gl_TexCoord[0].xy;\
\
    /* half-width of sinusoid */\
    float hw = 0.5*( (((1.0+c)/(1.0-c))-1.0) / (((1.0+c)/(1.0-c))+1.0) );\
\
    /* Get sinusoid for mixing two colors */\
    float s = 0.5 + hw*cos( ((p[0]-pixCenter[0])/ppd) * (f*6.2832) );\
    gl_FragColor = mix(ColorHigh, ColorLow, s);\
\}}